It's a phrase similar to "give a cat for a hare", but with fish. The value of lily fish ("blue whiting" or vulgarly cod) is lower than that of hake ("pescada or whiting"), but once cooked the taste is similar, and that is why the deception of passing one off as another at meals is compared in the saying to any scam.